Merged
Conversation
24af606 to
b6a814c
Compare
R8 headers have a different format from "normal" ProGuard headers. This splits the parsing of the two header formats apart and uses `serde` for R8 headers (they are specified to be in JSON format).
b6a814c to
68a1e1f
Compare
Dav1dde
approved these changes
Jun 25, 2025
Member
Dav1dde
left a comment
There was a problem hiding this comment.
Maybe makes sense to add some tests that make sure the conditional parsing works as expected.
src/mapping.rs
Outdated
| let bytes = consume_leading_newlines(bytes); | ||
|
|
||
| let result = if bytes.starts_with(b"#") { | ||
| let result = if bytes.starts_with(b"# {") { |
Member
There was a problem hiding this comment.
Is there always a space or is it optional in the spec?
Contributor
Author
There was a problem hiding this comment.
Unfortunately the spec isn't that detailed or explicit. In all examples I've seen there's a space, but it would probably make sense to be more careful here.
Contributor
Author
Which conditional parsing do you mean? |
Member
|
Where you added another branch: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
R8 headers have a different format from "normal" ProGuard headers. This splits the parsing of the two header formats apart and uses
serdefor R8 headers (they are specified to be in JSON format).See https://r8.googlesource.com/r8/+/refs/heads/main/doc/retrace.md#additional-information-appended-as-comments-to-the-file for R8 headers.
Ref #48. Ref RUSTPRO-3.